﻿@model Apps.Models.Sys.SysUserModel
@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.Sys;
@using Apps.Locale;
@{

    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";

    List<permModel> perm = null;
}
<style>
    input[type="text"] {
        width: 200px;
    }

    th {
        width: 120px;
    }

    select {
        width: 200px;
    }
</style>
<div id="modalwindow" class="easyui-window" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
<div style="width:98%; margin:0 auto;">
    <form>
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.CreateTime)
        @Html.HiddenFor(model => model.CreatePerson)
        @Html.HiddenFor(model => model.Attach)
        <div class="easyui-panel" title="账号信息" style="width:100%;height:140px;">

            <table class="formtable">
                <tbody>

                    <tr>
                        <th>
                            登录账号：
                        </th>
                        <td>
                            <input id="UserName" name="UserName" readonly="readonly" type="text" value="@Model.UserName" class="valid" />
                        </td>
                        <th>
                            启用帐户：
                        </th>
                        <td>
                            @if (Model.State)
                            {
                                <input id="State" name="State" readonly="readonly" type="text" value="启用" class="valid" />
                            }
                            else
                            {
                                <input id="State" name="State" readonly="readonly" type="text" value="禁用" class="valid" />
                            }
                        </td>

                        <th>
                            是否在职：
                        </th>
                        <td>
                            @if (Model.State)
                            {
                                <input id="JobState" name="JobState" readonly="readonly" type="text" value="在职" class="valid" />
                            }
                            else
                            {
                                <input id="JobState" name="JobState" readonly="readonly" type="text" value="离职" class="valid" />
                            }
                        </td>
                        <th>

                        </th>
                        <td></td>
                    </tr>

                    <tr>
                        <th>
                            部门：
                        </th>
                        <td>
                            <input id="DepId" name="DepId" readonly="readonly" type="text" value="@Model.DepName" class="valid" />
                        </td>
                        <th>
                            职位：
                        </th>
                        <td>
                            <input id="PosId" name="PosId" readonly="readonly" type="text" value="@Model.PosName" class="valid" />
                        </td>
                        <th>
                            @Html.LabelFor(model => model.Lead, 0)：
                        </th>
                        <td>
                            <input id="Lead" name="Lead" readonly="readonly" type="text" value="@Model.LeadName" class="valid" />
                        </td>
                    </tr>

                </tbody>
            </table>
        </div>
        <div class="hr"></div>
        <div class="easyui-panel" title="基本资料" style="width: 100%; height: 340px;">
            <table class="formtable">
                <tr>
                    <th>
                        用户名称：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.TrueName, new { @readonly = "readonly" })
                    </td>
                    <th>
                        @Html.LabelFor(model => model.Sex, 0)：
                    </th>
                    <td>
                        <input @(Model.Sex == "男" ? "checked='checked'" : "") name="Sex" value="男" type="radio" disabled="disabled" readonly="readonly" />男
                        <input @(Model.Sex == "女" ? "checked='checked'" : "") name="Sex" type="radio" value="女" disabled="disabled" readonly="readonly"/>女
                    </td>
                    <td rowspan="6" style=" border-left:dashed 1px #ccc; padding-left:30px">
                        @Html.HiddenFor(model => model.Photo)
                        <img class="expic" src="@((Model.Photo==null||Model.Photo=="")?"/Content/Images/NotPic.jpg":Model.Photo)" /><br />
                        <span class="uploading">@Resource.Uploading</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Birthday, 0)：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.Birthday, new {  Value = String.Format("{0:yyyy-MM-dd}", Model.Birthday), @style = "width:200px" , @readonly = "readonly" })
                    </td>
                    <th>
                        @Html.LabelFor(model => model.JoinDate, 0)：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.JoinDate, new { Value = String.Format("{0:yyyy-MM-dd}", Model.JoinDate), @style = "width:200px" , @readonly = "readonly" })
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Nationality, 0)：
                    </th>
                    <td style="width: 100px;">
                        @Html.TextBoxFor(model => model.Nationality, new { @readonly = "readonly" })
                    </td>
                    <th>
                        @Html.LabelFor(model => model.Native, 0)：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.Native, new { @readonly = "readonly" })
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Marital, 0)：
                    </th>
                    <td>
                        <select id="Marital" name="Marital" disabled="disabled">
                            <option value="" @(string.IsNullOrEmpty(Model.Marital) ? "selected=\"selected\"" : "")>--未选择--</option>
                            <option value="已婚" @(Model.Marital == "已婚" ? "selected=\"selected\"" : "")>已婚</option>
                            <option value="未婚" @(Model.Marital == "未婚" ? "selected=\"selected\"" : "")>未婚</option>
                        </select>
                    </td>
                    <th>
                        @Html.LabelFor(model => model.Political, 0)：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.Political, new { @readonly = "readonly" })
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Degree, 0)：
                    </th>
                    <td>
                        <select id="Degree" name="Degree" disabled="disabled">
                            <option value="" @(string.IsNullOrEmpty(Model.Degree) ? "selected=\"selected\"" : "")>--未选择--</option>
                            <option value="高中" @(Model.Degree == "高中" ? "selected=\"selected\"" : "")>高中</option>
                            <option value="专科" @(Model.Degree == "专科" ? "selected=\"selected\"" : "")>专科</option>
                            <option value="本科" @(Model.Degree == "本科" ? "selected=\"selected\"" : "")>本科</option>
                            <option value="硕士" @(Model.Degree == "硕士" ? "selected=\"selected\"" : "")>硕士</option>
                            <option value="博士" @(Model.Degree == "博士" ? "selected=\"selected\"" : "")>博士</option>
                        </select>
                    </td>
                    <th>
                        @Html.LabelFor(model => model.Professional, 0)：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.Professional, new { @readonly = "readonly" })
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.School, 0)：
                    </th>
                    <td colspan="1">
                        @Html.TextBoxFor(model => model.School, new { @readonly = "readonly" })
                    </td>
                    <th>
                        @Html.LabelFor(model => model.Card, 0)：
                    </th>
                    <td colspan="2">
                        @Html.TextBoxFor(model => model.Card, new { @readonly = "readonly" })
                    </td>
                </tr>
            </table>
        </div>
        <div class="hr"></div>
        <div class="easyui-panel" title="联系方式" style="width: 100%; height: 350px;">
            <table class="formtable">

                <tbody>

                    <tr>
                        <th>
                            @Html.LabelFor(model => model.MobileNumber, 0)：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.MobileNumber, new { @readonly = "readonly" })
                        </td>
                        <th>
                            @Html.LabelFor(model => model.PhoneNumber, 0)：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.PhoneNumber, new { @readonly = "readonly" })
                        </td>
                        <th>
                            @Html.LabelFor(model => model.QQ, 0)：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.QQ, new { @readonly = "readonly" })
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.EmailAddress, 0)：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.EmailAddress, new { @readonly = "readonly" })
                        </td>
                        <th>
                            @Html.LabelFor(model => model.OtherContact, 0)：
                        </th>
                        <td colspan="3">
                            @Html.TextBoxFor(model => model.OtherContact, new { @readonly = "readonly" })
                        </td>
                    </tr>
                    <tr style="display:none">
                        <th>
                            @Html.LabelFor(model => model.Province, 0)：
                        </th>
                        <td>
                            @Html.DropDownListFor(model => model.Province, ViewBag.Areas as SelectList)
                        </td>
                        <th>
                            @Html.LabelFor(model => model.City, 0)：
                        </th>
                        <td>
                            <select id="City" name="City">
                                <option>--未选择--</option>
                            </select>
                        </td>
                        <th>
                            @Html.LabelFor(model => model.Village, 0)：
                        </th>
                        <td>
                            <select id="Village" name="Village">
                                <option>--未选择--</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.Address, 0)：
                        </th>
                        <td colspan="5">
                            @Html.TextBoxFor(model => model.Address, new { style = "width:800px;", @readonly = "readonly" })
                        </td>

                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.Expertise, 0)：
                        </th>
                        <td colspan="5">
                            @Html.TextAreaFor(model => model.Expertise, new { style = "width:800px;height:50px;" , @readonly = "readonly" })
                        </td>
                    </tr>
                    @*<tr style="display:none">
                            <th>
                                @Html.LabelFor(model => model.Attach,0)：
                            </th>
                            <td colspan="5">
                                @Html.TextBoxFor(model => model.Attach, new { style = "width:800px;" })
                            </td>
                        </tr>*@
                </tbody>
            </table>
        </div>
    </form>
</div>


<script type="text/javascript">

    //ifram 返回
    $("#btnReturn").click(function () {
        window.parent.frameReturnByClose();
    });

    function frameReturnByClose() {
        $("#modalwindow").window('close');
    }
</script>